#ifndef _APPS_BDESKTOP_CDOCKICON_H_
#define _APPS_BDESKTOP_CDOCKICON_H_

#include "auto.h"
#include <buola/utility/usignal.h>
#include <buola/gui.h>

namespace buola { namespace bdesktop {

class CDockIcon
{
protected:
    CDockIcon();
    virtual ~CDockIcon();

public:
    void SetPos(const CRect &pPos);
    void OnClick(gui::CMouseEvent *pE);

    virtual double GetRelativeWidth()=0;
    virtual void Draw(const CRect &pRect,double pOpacity)=0;

    USignal<void(CRect)> sPosChanged;
    USignal<void(gui::CMouseEvent*)> sClicked;

    void SetText(const std::wstring &pText) {   mText=pText;    }

    CRect mPos;
    std::wstring mText;
};

/*namespace bdesktop*/ } /*namespace buola*/ }

#endif
